<div class="setting-base">
  <form dForm [layout]="layoutDirection" [labelSize]="'lg'" [labelAlign]="'end'">
    <d-form-item>
      <d-form-label [required]="false"><span class="label">开机自启：</span></d-form-label>
      <d-form-control>
        <div class="control">
          <d-toggle
            name="autoStart"
            [(ngModel)]="settings.autoStart.statusValue"
            (change)="settingChange($event, 'autoStart')"
          ></d-toggle>
        </div>
      </d-form-control>
    </d-form-item>
    <d-form-item>
      <d-form-label [required]="false"><span class="label">启动时检查更新：</span></d-form-label>
      <d-form-control>
        <div class="control">
          <d-toggle
            name="autoUpdate"
            [(ngModel)]="settings.autoUpdate.statusValue"
            (change)="settingChange($event, 'autoUpdate')"
          ></d-toggle>
        </div>
      </d-form-control>
    </d-form-item>
    <d-form-item>
      <d-form-label [required]="false"><span class="label">接收通知：</span></d-form-label>
      <d-form-control>
        <div class="control">
          <d-toggle
            name="inform"
            [(ngModel)]="settings.inform.statusValue"
            (change)="settingChange($event, 'inform')"
          ></d-toggle>
        </div>
      </d-form-control>
    </d-form-item>
    <d-form-item>
      <d-form-label [required]="false"><span class="label">自动登录：</span></d-form-label>
      <d-form-control>
        <div class="control">
          <d-toggle
            name="autoLogin"
            [(ngModel)]="settings.autoLogin.statusValue"
            (change)="settingChange($event, 'autoLogin')"
          ></d-toggle>
        </div>
      </d-form-control>
    </d-form-item>
    <d-form-item>
      <d-form-label [required]="false"><span class="label">点击关闭时：</span></d-form-label>
      <d-form-control>
        <div class="control">
          <d-radio-group
            [direction]="'row'"
            [name]="'closeEvent'"
            [(ngModel)]="settings.closeEvent.textValue"
            (change)="settingChange($event, 'closeEvent')"
          >
            <d-radio [name]="'closeEvent'" value="minimizable">最小化</d-radio>
            <d-radio [name]="'closeEvent'" value="quit">退出</d-radio>
          </d-radio-group>
        </div>
      </d-form-control>
    </d-form-item>
  </form>
</div>
